<template>
  <div class="zhuanti">
    <h2 class="hometitle">特别推荐</h2>
    <ul>
      <li>
        <i>
          <img :src="specialRecData[0].photoList[0]" @click="to(specialRecData[0].uid)"/>
        </i>
        <p>
          {{specialRecData[0].summary}}
          <span>
            <a href="javascript:void(0);">阅读</a>
          </span>
        </p>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      specialRecData:[]
    };
  },
  methods: {
    to(blogUid) {
      let routeData = this.$router.resolve({
        path: "/info",
        query: { blogUid }
      });
      window.open(routeData.href, "_blank");
    }
  },
  created(){
    let session=window.localStorage
    let blogs=JSON.parse(session.getItem("blogs"))
    this.specialRecData.push(blogs[3])
  },
};
</script>

<style>
</style>